home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / Timing / SimplestClock.lha / SimplestClock.doc < prev    next >
Encoding:
Text File  |  1994-03-11  |  4.8 KB  |  113 lines

  1.  
  2.                               The Simplest Clock
  3.                                      V1.56
  4.                                   9 Mar 1993
  5.  
  6.  
  7.                                Frantisek Dufka
  8.                                Hrusovska 9
  9.                                701 00, Ostrava 1
  10.                                Czech Republic
  11.  
  12.                           e-mail: dufkaf@risc.upol.cz
  13.  
  14. This program is public domain. You can freely distribute it as long as you
  15. keep all the files unchanged. You are using it on your own risk.
  16.  
  17. As I know this program works fine with OS V1.3/2.0/3.0, if you have problems
  18. with any OS version, send me an e-mail please.
  19.  
  20. CLI USAGE:
  21.  
  22. SimplestClock [[-[r][number]] RawDoSimplestClockFmtString]
  23.  
  24. DESCRIPTION:
  25.  
  26.   This proggy lives in a small window on the top of any suitable Intuition
  27. screen and shows some important information (time and size of your free mem)
  28. in a way you specify by RawDoSimplestClockFmtString.
  29.  
  30.   Term "suitable Intuition screen" means usual Intuition screen with name and
  31. gadgets (without flag SCREENQUIET), which is wide enough for clock's window.
  32.  
  33.   Default command line options are :
  34.  
  35.                "-5 Chip:%B7ld Fast:%C7ld Time: %A02d:%02d:%02d"
  36.  
  37. Let me explain that curious RawDoSimplestClockFmtString first please ...
  38.  
  39.   String is made up from C-style format string (printf etc.) with some special
  40. SimplestClock commands inserted just after '%' characters. Each command
  41. expresses number or numbers which are passed to evaluating routine. (function
  42. RawDoFmt from Exec library)
  43.  
  44. SimplestClock commands currently supported :
  45.  
  46.   A (3 words) = system time (hours,minutes,seconds)
  47.   B (1 long)  = amount of free Chip memory in bytes
  48.   C (1 long)  = amount of free Fast memory
  49.   D (1 long)  = amount of free Public memory 
  50.   E (1 long)  = size of largest free memory block
  51.   F (1 long)  = amount of free Chip memory in kilobytes
  52.   G (1 long)  = amount of free Fast memory
  53.   H (1 long)  = amount of free Public memory 
  54.   I (1 long)  = size of largest free memory block
  55.  
  56.   If you don't know what 1 long, 3 words or C-style format string means read
  57. next paragraph otherwise skip it please.
  58.  
  59.   1 long means that there must be %7ld substring in C-style format string
  60. (%7ld means long decimal number made of 7 characters) and 3 words means
  61. that there should be %02d substring for 3 times in format string (%02d means
  62. decimal number made of 2 characters, empty spaces are filled with zeroes).
  63.  
  64.   So if you have 2 MB of Chip RAM, no Fast RAM and you don't want to see
  65. current time (well, but in this case the name 'Simplest Clock' looks a bit
  66. strange isn't it ?) you could write for example
  67.  
  68. SimplestClock I currently have %B8ld bytes of free Chip memory for you.
  69.  
  70. Or If you don't care about every little free byte in your Amiga, but you want
  71. to know what's the time, and you are not going to waste all the place of your
  72. screen bar for it, you can type for example
  73.  
  74. SimplestClock %F4ldK %A02d:%02d:02d
  75.  
  76.   There's no need to 'Run' it, it executes part of itself as a new process.
  77. You can quit it by choosing menuitem called .... eh I forgot it's name, but
  78. I think you'll find it.
  79.  
  80.   There's also menuitem called 'Always in the front' there. If you check it,
  81. the clock will try to live always on the front screen if it's possible. This
  82. is the only way how to move clock thru screens. Just turn it on, then select
  83. screen, and turn it off.
  84.  
  85.   But there's one little problem. Everytimes when the clock moves to another
  86. screen it tries to close its screen (except Workbench Screen). It is safe
  87. because in intuition library version>=36 function CloseScreen doesn't close
  88. the screen if there's any window attached to it. And it's easy to correct it
  89. in V34 (takes about 14 bytes). So when you quit your application with clock
  90. on it's screen, the screen will stay on until you move the clock to another
  91. screen. So far so good, but when somebody opens screen without any window and
  92. you bring clock to that screen and then to another, the screen will be closed.
  93. Well, and if somebody writes something to closed screen ......... CRASH!!!
  94. But it never happened to me yet. Because when somebody opens intuition-style
  95. screen it is usual to open also backdrop window on it, cause you can't attach
  96. menus and gadgets (except system ones) to the screen (screen hasn't any IDCMP
  97. port, so you can't wait for events).
  98.  
  99.   To avoid crashes menuitem 'Always ...' is automatically turned off, when
  100. Clock moves to screen without any window. You can disable it with command line
  101. option -r.
  102.  
  103.   Option -number means task priority of SimplestClock process. The number can
  104. range from 0 to 9 and exactly means task priority minus four, so -0 means
  105. task priority -4 and -9 means priority of 5.
  106.  
  107. I hope you will find these bytes useful. Any ideas, suggestions, questions or
  108. donations are welcome.
  109.  
  110.                                    Frantisek Dufka
  111.  
  112. P.S. Sorry for my english, but it's not my native language.
  113.